# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.HealthCare.V1.Model.RollbackHl7V2MessagesRequest do
  @moduledoc """
  Point in time recovery rollback request.

  ## Attributes

  *   `changeType` (*type:* `String.t`, *default:* `nil`) - Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a certain type.
  *   `excludeRollbacks` (*type:* `boolean()`, *default:* `nil`) - Optional. Specifies whether to exclude earlier rollbacks.
  *   `filteringFields` (*type:* `GoogleApi.HealthCare.V1.Model.RollbackHL7MessagesFilteringFields.t`, *default:* `nil`) - Optional. Parameters for filtering.
  *   `force` (*type:* `boolean()`, *default:* `nil`) - Optional. When enabled, changes will be reverted without explicit confirmation.
  *   `inputGcsObject` (*type:* `String.t`, *default:* `nil`) - Optional. Cloud storage object containing list of {resourceId} lines, identifying resources to be reverted
  *   `resultGcsBucket` (*type:* `String.t`, *default:* `nil`) - Required. Bucket to deposit result
  *   `rollbackTime` (*type:* `DateTime.t`, *default:* `nil`) - Required. Times point to rollback to.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :changeType => String.t() | nil,
          :excludeRollbacks => boolean() | nil,
          :filteringFields =>
            GoogleApi.HealthCare.V1.Model.RollbackHL7MessagesFilteringFields.t() | nil,
          :force => boolean() | nil,
          :inputGcsObject => String.t() | nil,
          :resultGcsBucket => String.t() | nil,
          :rollbackTime => DateTime.t() | nil
        }

  field(:changeType)
  field(:excludeRollbacks)
  field(:filteringFields, as: GoogleApi.HealthCare.V1.Model.RollbackHL7MessagesFilteringFields)
  field(:force)
  field(:inputGcsObject)
  field(:resultGcsBucket)
  field(:rollbackTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.HealthCare.V1.Model.RollbackHl7V2MessagesRequest do
  def decode(value, options) do
    GoogleApi.HealthCare.V1.Model.RollbackHl7V2MessagesRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.HealthCare.V1.Model.RollbackHl7V2MessagesRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
